package com.ruoyi.yard.mapper;

import java.util.List;
import com.ruoyi.yard.domain.CompWarehouseInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;

/**
 * 构件库存信息Mapper接口
 * 
 * @author ruoyi
 * @date 2022-09-02
 */
public interface CompWarehouseInfoMapper 
{
    /**
     * 查询构件库存信息
     * 
     * @param id 构件库存信息主键
     * @return 构件库存信息
     */
    public CompWarehouseInfo selectCompWarehouseInfoById(Long id);

    /**
     * 查询构件库存信息列表
     * 
     * @param compWarehouseInfo 构件库存信息
     * @return 构件库存信息集合
     */
    public List<CompWarehouseInfo> selectCompWarehouseInfoList(CompWarehouseInfo compWarehouseInfo);

    /**
     * 新增构件库存信息
     * 
     * @param compWarehouseInfo 构件库存信息
     * @return 结果
     */
    public int insertCompWarehouseInfo(CompWarehouseInfo compWarehouseInfo);

    /**
     * 修改构件库存信息
     * 
     * @param compWarehouseInfo 构件库存信息
     * @return 结果
     */
    public int updateCompWarehouseInfo(CompWarehouseInfo compWarehouseInfo);

    /**
     * 删除构件库存信息
     * 
     * @param id 构件库存信息主键
     * @return 结果
     */
    public int deleteCompWarehouseInfoById(Long id);

    /**
     * 批量删除构件库存信息
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteCompWarehouseInfoByIds(Long[] ids);

    List<CompWarehouseInfo> selectCompWarehouseInfoByPlayId(@Param("planNo") String planNo);

    CompWarehouseInfo selectCompWarehouseInfoByCompomentNo(String warehouseCompomentNo);

    void updateReduceStock(@Param("warehouseCompomentNo") String warehouseCompomentNo,@Param("count") long count);

    List<CompWarehouseInfo> selectCompWarehouseInfoByWaybillNo(String waybillNo);

    Long selectCount(@Param("deliveryPlanNo") String deliveryPlanNo,@Param("warehouseCompomentNo") String warehouseCompomentNo);
}
